//选取规则1
{
var number1 = []
var i1
var ji1 = 0

function choice1() {
    var is = false
    if (number1.length == 46) {
        number1 = []
    }
    while (true) {
        i1 = Math.floor(Math.random() * 46);
        for (const key in number1) {
            if (number1[key] == i1) {
                is = true
                break
            }
        }
        if (is != true) {
            break
        }
        is = false
    }
    number1.push(i1);
    useCard1[ji1].style.display = "none"
    useCard1[i1].style.display = "block"
    ji1 = i1
}
}

// 选择规则2
{
var number2 = []
var i2
var ji2 = 0

function choice2() {
    var is = false
    if (number2.length == 46) {
        number2 = []
    }
    while (true) {
        i2 = Math.floor(Math.random() * 46);
        for (const key in number2) {
            if (number2[key] == i2) {
                is = true
                break
            }
        }
        if (is != true) {
            break
        }
        is = false
    }
    number2.push(i2);
    music1[i2].play()

    // useCard[ji2].style.display = "none"
    // useCard[i2].style.display = "block"
    // ji2 = i2
}
}

//选取规则3
{
var number3 = []
var i3
var ji3 = 0

function choice3() {
    var is = false
    if (number3.length == 25) {
        number3 = []
    }
    while (true) {
        i3 = Math.floor(Math.random() * 25);
        for (const key in number3) {
            if (number3[key] == i3) {
                is = true
                break
            }
        }
        if (is != true) {
            break
        }
        is = false
    }
    number3.push(i3);
    useCard2[ji3].style.display = "none"
    useCard2[i3].style.display = "block"
    ji3 = i3
}
}

// 选择规则4
{
    var number4 = []
    var i4
    var ji4 = 0
    
    function choice4() {
        var is = false
        if (number4.length == 25) {
            number4 = []
        }
        while (true) {
            i4 = Math.floor(Math.random() * 25);
            for (const key in number4) {
                if (number4[key] == i4) {
                    is = true
                    break
                }
            }
            if (is != true) {
                break
            }
            is = false
        }
        number4.push(i4);
        music2[i4].play()
    
        // useCard[ji2].style.display = "none"
        // useCard[i2].style.display = "block"
        // ji2 = i2
    }
    }